const path = require('path');



function resolve(dir){   
	return path.join(__dirname,dir)
}

module.exports = {
    productionSourceMap: false,
    publicPath: './',
    chainWebpack: (config) => {

        // 配置别名
        config.resolve.alias
            .set('@', resolve('./src'))
            .set('@config', resolve('./src/config'))
            .set('@service', resolve('./src/service'))
            .set('@view', resolve('./src/views'))
            .set('@http', resolve('./src/http'))
            .set('@com', resolve('./src/components'))
            .set('@views', resolve('./src/assets/less/views'))
            .set('@common', resolve('./src/assets/less/common'))

        config.module.rule('pug')
            .test(/\.pug$/)
            .use('pug-html-loader')
            .loader('pug-html-loader')
            .end()

    },
}